import vue from 'rollup-plugin-vue'
import typescript from "rollup-plugin-typescript2";
import nodeResolve from "@rollup/plugin-node-resolve";
import postcss from "rollup-plugin-postcss";
import * as path from "path";

export default [
    {
        input: 'src/index.ts',
        output: {
            format: 'esm',
            file: 'dist/index.js'
        },
        plugins: [
            nodeResolve(),
            vue(),
            typescript({
                tsconfig: path.resolve(__dirname, "tsconfig.json"),
                tsconfigOverride: {
                    compilerOptions: { declaration: true },
                }
            }),
            postcss()
        ],
        external: ['vue', 'axios']
    }
]
